![]() |
PATH![]() |
![]() ![]() |
Handles events such as window updating and resizing.
This is how your application would define its own event-handling function if you chose to call it MyEventProc :
pascal void MyEventProc (NavEventCallbackMessage callBackSelector,
NavCBRecPtr callBackParms,
void *callBackUD );
NavCBRec
. Your application uses the data supplied in this structure to begin processing the event.
Register your event-handling function by passing a Universal Procedure Pointer (UPP) in the
eventProc
parameter of a Navigation Services function such as NavGetFile
. You obtain this UPP by calling the macro
NewNavEventProc
and passing a pointer to your event-handling function. If you determine that the event is appropriate for your event-handling function, you can call other functions to handle custom control drawing, object filtering, or custom previews. For more information, see Creating Application-Defined Functions.
When events involve controls, your event-handling function must respond to events only for your application-defined controls. To determine which control is affected by an event, pass the kNavCtlGetFirstControlID constant, described in Custom Control Setting Constants
, in the selector parameter of the function NavCustomControl
.
Displays custom file previews. This is how your application would define its own preview function if you chose to call it MyPreviewProc :
pascal Boolean MyPreviewProc (
NavCBRecPtr callBackParms,
void *callBackUD );
NavCBRec
. Navigation Services uses this structure to provide data needed for your function to draw the preview.
Register your preview function by passing the resulting Universal Procedure Pointer (UPP) in the
previewProc
parameter of a Navigation Services function, such as NavGetFile
. You obtain this UPP by calling the function
NewNavPreviewProc
and passing a pointer to your preview-drawing function. When the user selects a file, Navigation Services calls your preview-drawing function. Your preview function, in turn, calls the function NavCustomControl
to determine if the preview area is visible and, if so, what its dimensions are. For more information, see Drawing Custom Previews.
Determines whether file objects should be displayed in the browser list and navigation menus. This is how your application would define its own filter function if you chose to call it MyFilterProc :
pascal Boolean MyFilterProc (AEDesc* theItem,
void* info,
void *callBackUD,
NavFilterModes filterMode);
IMPORTANT
Always check the Apple event descriptor type before deciding if an object needs to be filtered. Never assume that objects are type 'typeFSS' , because the browser or pop-up menus may contain objects of other types. Make sure that your function only returns false if it recognizes the object. For more information, see Obtaining Object Descriptions.
NavFileOrFolderInfo
. Navigation Services uses this structure to provide file or folder information about the item being passed to your filter function. This information is not valid for objects which are not HFS file objects.
Register your filter function by passing a Universal Procedure Pointer (UPP) in the
filterProc
parameter of a function such as NavGetFile
. You obtain this UPP by calling the macro
NewNavObjectFilterProc
and passing a pointer to your filter function. Navigation Services calls your filter function to determine whether a file object should be displayed in the browser list or the pop-up menus.
If you use a filter function in conjunction with built-in translation, you should provide a list of file types in the typeList parameter of a file-opening function such as NavGetFile to inform Navigation Services which document types your application can open. If you provide a list of file types in the typeList parameter, take care to ensure that your filter function does not accidentally filter out any document type described in the list. For more information, see Filtering File Objects.
If your filter function returns a result of true , Navigation Services displays the object. This is the opposite of Standard File filter functions.
Allows your application to control various settings in Navigation Services dialog boxes.
pascal OSErr NavCustomControl (NavContext context,
NavCustomControlMessages selector,
void *parms );
NavCBRec
specified in the
callBackParms
parameter of your event-handling function.
If you have provided an event-handling function and an event occurs in a Navigation Services dialog box, Navigation Services calls your event-handling function and specifies one of the constants described in Event Message Constants
in the
param
field of the structure of type NavCBRec
. Navigation Services specifies this structure in the
callBackParms
parameter of your event-handling function. When Navigation Services supplies the
kNavCBStart
constant in the
param
field, your application can call the
NavCustomControl
function and pass one of the constants described in Custom Control Setting Constants
to control various aspects of the active Navigation Services dialog box. For example, your application can tell Navigation Services to sort the browser list by date by calling the
NavCustomControl
function and passing the
kNavCtlSortBy
constant in the
selector
parameter and a pointer to the kNavSortDateField configuration constant in the
parms
parameter. (Some of the
NavCustomControlMessage
constants do not require a corresponding configuration constant.)
Navigation Services does not accept calls to the NavCustomControl function until an appropriate dialog box is fully initialized and displayed. Always check for the kNavCBStart constant, described in Event Message Constants , in the param field of the NavCBRec structure before calling the NavCustomControl function.
Note that your application can call the NavCustomControl function from within its event-handling function or its preview-drawing function.
Previous | Back Up One Level | Next |